# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=magictree
pkgver=1.3
pkgrel=9
groups=('blackarch' 'blackarch-misc')
pkgdesc='A penetration tester productivity tool designed to allow easy and straightforward data consolidation, querying, external command execution and report generation.'
arch=('any')
url='http://www.gremwell.com'
license=('custom:unknown')
source=('http://www.gremwell.com/sites/default/files/MagicTree-build1814.jar')
depends=('java-environment' 'screen')
sha512sums=('1db570488fcdb48a3c209d6d5e2acf9a34968f00a46f10c390ecbec01a471955683e1d23ed3abf1479203329ce409682bd250b39dd6eab2abdf3a06f05533ab3')
noextract=('MagicTree-build1814.jar')

package() {
  install -dm 755 "$pkgdir/usr/bin"

  install -Dm 644 MagicTree-*.jar "$pkgdir/usr/share/$pkgname/$pkgname.jar"

  cat > "$pkgdir/usr/bin/magictree" << EOF
#!/bin/sh
exec java -jar /usr/share/$pkgname/$pkgname.jar "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

